#include "Die.h"
#include <cstdlib>




void Die::ThrowDie( )
{
	this->value = rand() % 6 + 1;
}


void Die::WriteDie( )
{
	if( this->value == 1 )
	{
		cout << "-----" << "\n"
			<< "!   !" << "\n"
			<< "! X !" << "\n"
			<< "!   !" << "\n"
			<< "-----" << "\n";
	}
	else if( this->value == 2 )
	{
		cout << "-----" << "\n"
			<< "!X  !" << "\n"
			<< "!   !" << "\n"
			<< "!  X!" << "\n"
			<< "-----" << "\n";
	}
	else if( this->value == 3 )
	{
		cout << "-----" << "\n"
			<< "!X  !" << "\n"
			<< "! X !" << "\n"
			<< "!  X!" << "\n"
			<< "-----" << "\n";
	}
	else if( this->value == 4 )
	{
		cout << "-----" << "\n"
			<< "!X X!" << "\n"
			<< "!   !" << "\n"
			<< "!X X!" << "\n"
			<< "-----" << "\n";
	}
	else if( this->value == 5 )
	{
		cout << "-----" << "\n"
			<< "!X X!" << "\n"
			<< "! X !" << "\n"
			<< "!X X!" << "\n"
			<< "-----" << "\n";
	}
	else
	{
		cout << "-----" << "\n"
			<< "!X X!" << "\n"
			<< "!X X!" << "\n"
			<< "!X X!" << "\n"
			<< "-----" << "\n";
	}

}

Die::Die(void)
{ 
	this->value = 0; 
}


Die::~Die(void)
{
}
